﻿@{
    ViewBag.Title = "CategoryList";
}
@model List<CategoryInfo>
@if (Model.IsNoNull())
{
    List<CategoryInfo> objList1 = Model.Take(4).ToList();
    List<CategoryInfo> objList2 = Model.Skip(4).Take(4).ToList();
    <header id="" class="header">
        <nav class="mod-mian-nav-container">
            @if (objList1.IsNoNull())
            {
                <section class="mod-main-nav-list">
                    @foreach (CategoryInfo objCategoryInfo in objList1)
                    {
                        <a href="/news/articlelist/@objCategoryInfo.CategoryId">@objCategoryInfo.CategoryName</a>
                    }
                </section>
            }
            @if (objList2.IsNoNull())
            {
                <section class="mod-main-nav-list">
                    @foreach (CategoryInfo objCategoryInfo in objList2)
                    {
                        <a href="/news/articlelist/@objCategoryInfo.CategoryId">@objCategoryInfo.CategoryName</a>
                    }
                </section>
            }
        </nav>
    </header>
}
